package edu.ilstu.mind.ise.ccp.message.hashmap;

import edu.ilstu.mind.ise.ccp.message.MasterMessageFactory;
import edu.ilstu.mind.ise.ccp.message.MessageFactory;
import edu.ilstu.mind.ise.ccp.message.MutableMessage;

public class HashMapMutableMessageFactory implements MasterMessageFactory, MessageFactory {
	
	private final String moduleName;
	
	public HashMapMutableMessageFactory() {
		this(null);
	}
	
	public HashMapMutableMessageFactory(String moduleName) {
		this.moduleName = moduleName;
	}

	@Override
	public MutableMessage createMessage(String to, int numFields) {
		return new HashMapMutableMessage(moduleName, to, numFields);
	}

	@Override
	public MutableMessage createMessage(String from, String to, int numFields) {
		return new HashMapMutableMessage(from, to, numFields);
	}

}
